libs = user32.lib gdi32.lib kernel32.lib comctl32.lib

!message nmake usage:
!message 'nmake'           : build debug version.
!message 'nmake release='  : build release version.
!message 'nmake clean'     : clean workshop
!message

lkf = /nologo /debug /INCREMENTAL:no /libpath:%MYLIB%
lbf = /nologo
mtf = -nologo

!ifdef release
clfcc = /nologo /c /O2 /MD /Zi /DNDEBUG /I%MYINCLUDE% /EHsc
clfc = /nologo /c /O2 /MD /Zi /DNDEBUG /I%MYINCLUDE%
!else
clfcc = /nologo /c /MDd /Zi /I%MYINCLUDE% /EHsc
clfc = /nologo /c /MDd /Zi /I%MYINCLUDE%
!endif

!ifdef release
mydll = libMarkMsg-r
all : $(mydll).dll t.exe
!else
mydll = libMarkMsg-d
all : $(mydll).dll t.exe
!endif

$(mydll).dll : $(mydll).obj $(mydll).exp
	link $(lkf) /out:$@ /dll $** $(libs)

$(mydll).exp : $(mydll).obj
	lib $(lbf) /def $**

$(mydll).obj : MarkMsg.c
	cl $(clfc) /Fo$@ /DGETDLL $**

t.exe : t.obj $(mydll).lib
	link $(lkf) $** $(libs)

t.obj : t.c
	cl $(clfc) $**

clean:
	del *.exe *.obj *.pdb *.dll *.exp *.lib *.txt
